package com.xiaobaibai.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author xiaobaibai
 * @since 2020-10-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("user_info")
@ApiModel(value="UserInfo对象", description="")
@JsonInclude(value = JsonInclude.Include.NON_NULL)
public class UserInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户信息id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "用户表中的id")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty(value = "用户消费金额")
    @TableField("user_amount")
    private BigDecimal userAmount;

    @ApiModelProperty(value = "用户积分")
    @TableField("user_integral")
    private Integer userIntegral;

    @ApiModelProperty(value = "用户订单数量")
    @TableField("user_order_quantity")
    private Integer userOrderQuantity;

    @ApiModelProperty(value = "用户优惠券数量(废弃)")
    @TableField("user_coupon_quantity")//废弃
    private Integer userCouponQuantity;

    @ApiModelProperty(value = "用户登录次数")
    @TableField("user_login_count")
    private Integer userLoginCount;

    @ApiModelProperty(value = "用户退货数量")
    @TableField("user_return_count")
    private Integer userReturnCount;

    @ApiModelProperty(value = "用户最后一次下单时间")
    @TableField("user_last_buy")
    private Date userLastBuy;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


}
